]> dgit.raspbian.org Git - gnome-shell.git/commit
messageTray: Disconnect to global signals on destruction
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Thu, 27 Nov 2025 23:28:12 +0000 (00:28 +0100)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Thu, 27 Nov 2025 23:32:52 +0000 (00:32 +0100)
commit1f4da30ff35577403b290648cbbc8eb4039e9d8f
tree2999011d5b72d87b5f32392085728ed7f95f65c4
parent9aa2cc5b2599f31edbf49a4e89449d5cb7b47b65
messageTray: Disconnect to global signals on destruction

The global display object has always a longer lifetime than anything
that is initialized from JS, so avoid signals that it may emit to be
handled at later point.

It handles issues such as:
  (gnome-shell:2429): Gjs-CRITICAL **: 23:18:35.025: Object
  Gjs_ui_messageTray_MessageTray (0x3440ed60), has been already disposed —
  impossible to set any property on it.
  This might be caused by the object having been destroyed from C code using
  something such as destroy(), dispose(), or remove() vfuncs.
  == Stack trace for context 0x31073eb0 ==
  #0       348db378 i   resource:///org/gnome/shell/ui/messageTray.js:1046 (3a8ac3a71f60 @ 104)
  #1       348db2d8 i   resource:///org/gnome/shell/ui/main.js:277 (3a8ac3a0b100 @ 119)

Seen in: https://gitlab.gnome.org/GNOME/gnome-shell/-/jobs/5846454

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3987>
js/ui/messageTray.js